package com.ssrs.framework;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 应用配置
 *
 * @author ssrs
 */
@Component
@ConfigurationProperties(prefix = "eight-roes")
public class EightRoesProperties {
    /**
     * 应用代码
     */
    private String code;
    /**
     * 应用名称
     */
    private String name;
    /**
     * 应用版本
     */
    private String version;
    /**
     * 应用环境
     */
    private String env;
    /**
     * 授权年份
     */
    private String copyrightYear;
    /**
     * 应用数据(日志/缓存/索引等)的存放路径,%{Parent}表示当前应用的根目录的父级目录
     */
    private String appDataPath;
    /**
     * 是否打印请求日志
     */
    private Boolean printfRequestLog;
    /**
     * 不进行xss过滤的地址(支持Ant表达式)
     */
    private String xssReleaseUrl;
    /**
     * 资源文件存放地址
     */
    private String resourceRoot;
    /**
     * WEB端token有效时长,单位分钟,refreshToken有效期为3倍
     */
    private Long webExpiration;
    /**
     * APP端token有效时长,单位分钟,refreshToken有效期为3倍
     */
    private Long appExpiration;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getEnv() {
        return env;
    }

    public void setEnv(String env) {
        this.env = env;
    }

    public String getCopyrightYear() {
        return copyrightYear;
    }

    public void setCopyrightYear(String copyrightYear) {
        this.copyrightYear = copyrightYear;
    }

    public String getAppDataPath() {
        return appDataPath;
    }

    public void setAppDataPath(String appDataPath) {
        this.appDataPath = appDataPath;
    }

    public Boolean getPrintfRequestLog() {
        return printfRequestLog;
    }

    public void setPrintfRequestLog(Boolean printfRequestLog) {
        this.printfRequestLog = printfRequestLog;
    }

    public String getXssReleaseUrl() {
        return xssReleaseUrl;
    }

    public void setXssReleaseUrl(String xssReleaseUrl) {
        this.xssReleaseUrl = xssReleaseUrl;
    }

    public String getResourceRoot() {
        return resourceRoot;
    }

    public void setResourceRoot(String resourceRoot) {
        this.resourceRoot = resourceRoot;
    }

    public Long getWebExpiration() {
        return webExpiration;
    }

    public void setWebExpiration(Long webExpiration) {
        this.webExpiration = webExpiration;
    }

    public Long getAppExpiration() {
        return appExpiration;
    }

    public void setAppExpiration(Long appExpiration) {
        this.appExpiration = appExpiration;
    }
}
